home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCM_105_Dialog < prev    next >
Encoding:
Text File  |  1992-04-08  |  2.1 KB  |  97 lines

  1. // %filename% -- dialog 
  2. // Created %date% %time% by AppMaker 
  3.  
  4. #include "U%dlogname%.h"
  5. #ifndef __TYPES__
  6.     #include <Types.h>
  7. #endif
  8. #ifndef __PACKAGES__
  9.     #include <Packages.h>
  10. #endif
  11. #include "ResourceDefs.h"
  12.  
  13. %for each item gen itemNr%
  14.  
  15. %for each item gen classMethods%
  16. #pragma segment ARes
  17. /*----------*/
  18. pascal void T%dlogname%::DoChoice    (TView        *origView, 
  19.                                       short        itsChoice)
  20. {
  21.     long        origID;
  22.  
  23.     origID = (long) (origView->fIdentifier);
  24.     switch (origID) {
  25.         %for each item gen doChoice%
  26.  
  27.     } /* switch */
  28.  
  29.     %if modalOneShot%
  30.         DismissDialog (origID);
  31.     %else%
  32.         inherited::DoChoice (origView, itsChoice);
  33.     %endif%
  34. } /* DoChoice */
  35.  
  36. #if qInspector
  37. #pragma segment AFields
  38. /*----------*/
  39. pascal void T%dlogname%::Fields (
  40.                         pascal void (*DoToField)
  41.                                 (StringPtr        fieldName, 
  42.                                  Ptr            fieldAddr, 
  43.                                  short            fieldType, 
  44.                                  void             *DoToField_StaticLink),
  45.                         void    *DoToField_StaticLink)
  46. {
  47.     (*DoToField) ("\pT%dlogname%", NULL, bClass, DoToField_StaticLink);
  48.     inherited::Fields (DoToField, DoToField_StaticLink);
  49. } /* Fields */
  50.  
  51. #endif
  52. %if modeless%
  53.     #pragma segment AOpen
  54.     /*----------*/
  55.     TWindow *New%dlogname% (void)
  56.     {
  57.         TWindow            *theWindow;
  58.         TObject            *dummy;
  59.  
  60.         theWindow = NewTemplateWindow (k%dlogname%ID, NULL);
  61.         // initialize subviews from current settings
  62.  
  63.         if (gDeadStripSuppression) {
  64.             dummy = new T%dlogname%;
  65.             %for each item gen gDeadStripSuppression%
  66.  
  67.         }
  68.         return (theWindow);
  69.     } /*New%dlogname%*/
  70. %else%
  71.     #pragma segment ASelCommand
  72.     /*----------*/
  73.     void Do%dlogname% (void)
  74.     {
  75.         TWindow            *aWindow;
  76.         TObject            *dummy;
  77.         TDialogView        *aDialogView;
  78.         ResType            dismisser;
  79.  
  80.         aWindow = NewTemplateWindow (k%dlogname%ID, NULL);
  81.         // initialize subviews from current settings
  82.         aDialogView = (TDialogView *)(aWindow->FindSubView ('dlog'));
  83.         dismisser = aDialogView->PoseModally ();
  84.         if (dismisser != aDialogView->fCancelItem) {
  85.             // use new settings from subviews
  86.         }
  87.         aWindow->Close ();
  88.  
  89.         if (gDeadStripSuppression) {
  90.             dummy = new T%dlogname%;
  91.             %for each item gen gDeadStripSuppression%
  92.  
  93.         }
  94.     } /* Do%dlogname% */
  95.  
  96. /* U%dlogname% */
  97.